<template>

    <div style="margin:10px 20px 0;" class="billContent">
        <!-- 设计器识别部分 -->
        <bForm ref="form" bill-root="true" :model="marketing" label-position="right" :rules="ruleValidate" :label-width="110" >
            <field type="string" field-label="活动主题" field-prop="name" v-model="marketing.name" :disabled="disabledName" col-span="12"></field>
            <field type="dict" field-label="活动类型" validate-rules="[
                    { 
                        validator: validateName,
                        trigger: 'blur' ,
                        type: 'string',
                        required : true
                    },
                    {
                        max : 100,
                        trigger: 'blur',
                        message: '输入字数长度超过100'
                    }
                ]" field-prop="type" :dictName="'com.beecode.inz.crm.dict.MarketingTypeDict'" :dictType="'list'" v-model="marketingTypeId" col-span="12"></field>
            <field type="date" field-label="开始日期" field-prop="startTime" :field-disabled="dateValidateDisabled" style="width:100%" type="date" placeholder="点击选择日期" v-model="marketing.startTime" :options="optionsStartDate" col-span="12"></field>
            <field type="currency" field-label="预计成本" v-model="marketing.predictCost" :showUnit="true" :unit="unit" col-span="12"></field>
            <field type="location" field-label="定位"  ref="locationRef" :lazyInit="true" v-model="newLocation" style="width:100%;" @on-change="setLocation" placeholder="请输入写字楼、街道、公司名称" col-span="24"></field>
        </bForm>
        <!-- 设计器识别部分结束 -->
        <bModal v-model="dialogMessage.show" :title="dialogMessage.title" @on-ok="operationLocation" :mask-closable="false" class-name="vertical-center-modal">
            <span>{{dialogMessage.message}}</span>
        </bModal>
    </div>
</template>